package com.itheima.edu.info.manager.system.controller;

import com.itheima.edu.info.manager.system.domain.Student;
import com.itheima.edu.info.manager.system.service.StudentService;

import java.util.Scanner;

/**
 * 操作学生时与用户交互的类
 * <p>
 * 有System.in
 * System.out
 */
public class StudentController  extends BaseStudentController{


    public Student getStudent(String id) {
        System.out.println("请输入姓名");
        String name = sc.next();
        System.out.println("请输入年龄");
        int age = sc.nextInt();
        System.out.println("请输入生日");
        String birthday = sc.next();
        //创建学生对象 封装数据
        Student student = new Student();
        student.setId(id);
        student.setName(name);
        student.setAge(age);
        student.setBirthday(birthday);
        return student;
    }
}
